import http from './config.js';
import baseUrl from './baseUrl.js';
export const service = {
    testGet: (params = {}) => {
        return http.get(baseUrl + '/article/download/blob', params);
    },
    testPost: (params = {}) => {
        return http.post(baseUrl + '/article', params, {
            responseType: 'json'
        });
    },
    // params 参数，extra额外配置
    getData: (params = {}, extra = {}) => {
        return http.get(baseUrl.testUrl + '/article', params, {
            responseType: 'json',
            cancel: true,
            ...extra
        });
    },
    testPostForm: (params = {}) => {
        return http.postForm(baseUrl.testUrl + '/article', params, {
            cancel: true,
            key: 'cang'
        });
    },
    testPut: (params = {}) => {
        return http.put(baseUrl.testUrl + '/article', params);
    },
    testPutForm: (params = {}) => {
        return http.putForm(baseUrl.testUrl + '/article', params);
    },
    testDelete: (params = {}) => {
        return http.delete(baseUrl.testUrl + '/article', params);
    },
    GetDownload: (params = {}) => {
        return http.GetDownload(baseUrl.testUrl + '/article/download/blob', params);
    },
    testRequest: (params = {}) => {
        return http.get(baseUrl.testUrl + '/twp-server/warn/list', params, {
            // cancel: true,
            key: 'cang'
        });
    },
    testRequest1: (params = {}) => {
        return http.get(baseUrl.testUrl + '/twp-server/population/listPoint', params, {
            headers: {
                Accesstoken: 'MTcyNDI5MDEzMDkxNV9qeF9hZG1pbg=='
            },
            cancel: true,
            key: 'ccc'
        });
    },
    testRequest2: (params = {}) => {
        return http.get(baseUrl.testUrl + '/twp-server/population/listPoint', params, {
            headers: {
                Accesstoken: 'MTcyNDI5MDEzMDkxNV9qeF9hZG1pbg=='
            }
        });
    }
};
